# ------------------------------------------------
"""
int(x)
float(x)
str(x)
eval(x)
"""
name = 'tom'
age = '20'
height = 1.75
# print(type(int(name))) # ValueError: invalid literal for int() with base 10: 'tom'
print(type(int(age))) # <class 'int'>
print(int(height)) # 舍弃小数部分
print(type(int(height))) # <class 'int'>

print("--------------------------------------")
# print(float(name)) # ValueError: could not convert string to float: 'tom'
print(float(age)) # 20.0
print(float(height))# 1.75


print("--------------------------------------")
# print(eval(name)) # ValueError: could not convert string to float: 'tom'
print(eval(age)) # 20.0
# print(eval(height))# 1.75 TypeError: eval() arg 1 must be a string, bytes or code object
print(eval('1.75'))# 1.75

